<!DOCTYPE html>
<html>
<head>
    <title>积分商城</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <link rel="stylesheet" href="${s.base}/mobile/css/weui.min.css">
    <link rel="stylesheet" href="${s.base}/mobile/css/jquery-weui.min.css">
    <link rel="stylesheet" href="${s.base}/mobile/css/base.css">
    <link rel="stylesheet" href="${s.base}/mobile/css/component.css?1232445">
    <link rel="stylesheet" href="${s.base}/mobile/css/jfsc.css">
    <style type="text/css">
        body,html{background: #ffffff;}
    </style>
</head>
<body>

<!--头部开始
<div class="xyg-comp-banner swiper-container">
    <div class="swiper-wrapper">
        <#list shopBannerList as shopBanner>
        <div class="swiper-slide"><img src="${shopBanner.image}"/></div>
        </#list>
    </div>
    <div class="swiper-pagination xyg-comp-banner-swiper"></div>
</div>

-->

<div style="width:100%;height:auto;"><img src="/mobile/images/banner4.jpg"></div>
<!--头部结束-->

<div class="xyg-menu">
    <div class="xyg-menu-item" onclick="goMyPage('${memberId}')">
            <div class="xyg-menu-item-pic">
                <img src="${s.base}/mobile/images/jfsc_icon_1.png"/>
            </div>
            <div class="xyg-menu-item-title">
                个人中心
            </div>
    </div>
    <div class="xyg-menu-item" onclick="goShopOrderListPage('${memberId}')">
        <div class="xyg-menu-item-pic">
            <img src="${s.base}/mobile/images/jfsc_icon_2.png"/>
        </div>
        <div class="xyg-menu-item-title">
            兑换订单
        </div>
    </div>
    <div class="xyg-menu-item" onclick="goRecoveryRecordIntegralListPage('${memberId}')">
        <div class="xyg-menu-item-pic">
            <img src="${s.base}/mobile/images/jfsc_icon_3.png"/>
        </div>
        <div class="xyg-menu-item-title">
            积分明细
        </div>
    </div>
    <div class="xyg-menu-item" onclick="goTixianPage('${memberId}')">
        <div class="xyg-menu-item-pic">
            <img src="${s.base}/mobile/images/jfsc_icon_4.png"/>
        </div>
        <div class="xyg-menu-item-title">
            积分提现
        </div>
    </div>
    <div class="clearBoth"></div>
</div>
<!--导航结束-->
<div class="xyg-index margin-top-05rem">
    <div style="width:100%; height:3rem; line-height:3rem; color:#000; width:92%; padding:0px 4%;background:#fff;font-size:1em;font-weight:bold;text-align:center;">
        兑换商品
    </div>
    <!-- 二行商品栏目开始 -->
    <div class="xyg-product" >
        <div class="clearBoth"></div>
    </div>
</div>

<div class="xyg-product-list_loadmore weui-loadmore clearBoth">
    <i class="weui-loading"></i>
    <span class="weui-loadmore__tips">正在加载</span>
</div>
</body>
<script src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>
<script src="${s.base}/mobile/js/jquery-2.1.4.js"></script>
<script src="${s.base}/mobile/js/jquery-weui.js"></script>
<script src="${s.base}/mobile/js/swiper.js"></script>
<script src="${s.base}/mobile/fonts/iconfont.js"></script>
<script src="${s.base}/mobile/js/component.js?12232332"></script>
<script src="${s.base}/mobile/js/base.js?122323322332"></script>


<!--js分享代码开始-->
<input type="hidden" value="${jSTicketShareResponse.appid}" id="appid" />
<input type="hidden" value="${jSTicketShareResponse.fxTitle}" id="fxTitle" />
<input type="hidden" value="${jSTicketShareResponse.fxImgUrl}" id="fxImgUrl" />
<input type="hidden" value="${jSTicketShareResponse.fxDesc}" id="fxDesc" />
<input type="hidden" value="${jSTicketShareResponse.fxUrl}" id="fxUrl" />
<input type="hidden" value="${jSTicketShareResponse.nonceStr}" id="nonceStr" />
<input type="hidden" value="${jSTicketShareResponse.timestamp}" id="timestamp" />
<input type="hidden" value="${jSTicketShareResponse.signature}" id="signature" />
<script src="${s.base}/mobile/js/share.js"></script>
<script type="text/javascript">
    function initDate() {
        $.fn.initXygCompBanner();
    }

    $(document).ready(function (e) {
        initDate();
    });

    var memberId='${webMember.id}';
    var num=10;
    var loading = false;  //状态标记
    var pageStart=0;
    $(document).ready(function(e) {
        sendPost();
        $(document.body).infinite();
        $(document.body).infinite().on("infinite", function() {
            if(loading) return;
            loading = true;
            sendPost();
        });
    });

    function sendPost() {
        pageStart++;
        $.post("/phone/jfscJsonList",{
            pageSize : num,
            pageNum: pageStart,
            integralStatus : '2'
        },function(resultInfo){
            if (resultInfo.code == 0){
                var result = '';
                if (resultInfo.data!=null && resultInfo.data.length > 0){
                    for(var i=0;i<resultInfo.data.length;i++){
                        var shopItem = resultInfo.data[i];
                        var content='<div class="xyg-product-item" onclick="goProductDescPage(\''+memberId+'\',\''+shopItem.id+'\')">\
                            <div class="xyg-product-item-pic">\
                            <div class="xyg-pic">\
                            <div class="xyg-pic-top">\
                            </div>\
                            <img src="'+shopItem.image+'" style="width: 100%; height: 15rem;"/>\
                            </div>\
                            </div>\
                            <div class="xyg-product-item-title font-grade-one">\
                            '+shopItem.title+'\
                            </div>\
                            <div class="xyg-product-item-bottom">\
                            <div class="xyg-comp-hy">\
                            <div class="xyg-comp-hy-left">\
                            <div class="xyg-comp-hy-left-price">&nbsp;'+shopItem.integral+'积分</div>\
                        </div>\
                        <div class="xyg-comp-hy-right">\
                            <img src="${s.base}/mobile/images/icon_gwc.png"/>\
                            </div>\
                            <div class="clearBoth"></div>\
                            </div>\
                            </div>\
                            </div>';

                        $(".xyg-product").append(content);
                        loading = false;
                        if(!resultInfo.hasNextPage){
                            $(document.body).destroyInfinite();
                            $(".xyg-product-list_loadmore").hide();
                        }
                    }
                }
            }else{
                $(document.body).destroyInfinite();
                $(".xyg-product-list_loadmore").hide();
            }
        },"json");
    }
</script>

</html>

